package com.example.forum_system.service.impl;

import com.example.forum_system.common.AppVar;
import com.example.forum_system.dao.BoardMapper;
import com.example.forum_system.model.Board;
import com.example.forum_system.service.IBoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @BelongsProject: 0.forum_system
 * @BelongsPackage: com.example.forum_system.service.impl
 * @Author : 游在海里的鱼
 * @CreateTime : 2023-11-12  12:55
 * @Version : 1.0
 * @Description : TODO
 */
@Service
public class BoardService implements IBoardService {

    @Autowired
    BoardMapper boardMapper;

    @Override
    public List<Board> selectByNum() {
        return boardMapper.selectBoardsByNum(AppVar.BOARD_NUM);
    }

    @Override
    public Board selectOneById(long id) {
        return boardMapper.selectOneById(id);
    }

}
